import request from '@neu/biz-core/utils/request'

export const list = (belongs) => {
  return request({
    url: '/dcam/api/w/printers/' + belongs + '/list',
    method: 'get'
  })
}

export const get = (id) => {
  return request({
    url: '/dcam/api/w/printers/' + id,
    method: 'get'
  })
}

export const getMyPrinter = () => {
  return request({
    url: '/dcam/api/w/printers/me',
    method: 'get'
  })
}

export const remove = (id) => {
  return request({
    url: '/dcam/api/w/printers/' + id,
    method: 'delete'
  })
}

export const create = (data) => {
  return request({
    url: '/dcam/api/w/printers',
    data,
    method: 'post'
  })
}

export const update = (id, data) => {
  return request({
    url: '/dcam/api/w/printers/' + id,
    data,
    method: 'put'
  })
}
